QT Questions
If you are using qmake as build tool, all you need to do is to make sure that /opt/lsb/bin comes first in your PATH environment variable. Simply re-run qmake and make to produce LSB compliant binaries:
export PATH=/opt/lsb/bin:$PATH qmake make
If, for some reason, you don't want to use LSB's qmake, make sure to set the environment variable QMAKESPEC to linux-lsb before running qmake:
export QMAKESPEC=linux-lsb qmake make
The linux-lsb qmake spec was added in Qt 4.1.
Links:
- Deploying to the Bazaar introducing Qt's LSB support and Trolltech's commitment to the LSB.
libpng Questions
Interfaces from upstream libpng version 1.2.8 that are not included in lsb-libpng fall into two categories - 1) Deprecated functions and 2) Utility functions that were found to have little or no usage by applications 3) Functions that are not exported by the default (upstream and major distros) compile time options
The list of deprecated functions is as below: png_read_destroy png_write_destroy png_permit_empty_plte png_get_header_ver png_check_sig png_zalloc png_zfree png_info_init png_info_init_2 png_read_init png_read_init_2 png_write_init png_write_init_2
Remaining functions not included are: png_debug2 //macro png_reset_zstream png_chunk_error png_chunk_warning png_convert_from_struct_tm png_convert_from_time_t png_convert_to_rfc1123 png_create_read_struct_2 png_create_write_struct_2 png_destroy_info_init png_free_chunk_list png_free_default png_free_data png_get_cHRM_fixed png_get_copyright png_get_filter_type png_get_gAMA_fixed png_get_header_version?? png_get_mem_ptr png_get_pCAL png_get_pixel_aspect_ratio png_get_pixels_per_meter png_get_rgb_to_gray_status png_get_signature png_get_sPLT png_get_unknown_chunks png_get_user_chunk_ptr png_set_gray_1_2_4_to_8 png_set_palette_to_rgb png_set_tRNS_to_alpha png_set_user_limits png_get_user_width_max png_get_user_height_max png_get_user_transform_ptr png_get_x_offset_microns png_get_y_offset_microns png_get_compression_buffer_size png_handle_as_unknown png_malloc_default png_memcpy png_memcpy_check png_memset png_memset_check png_set_add_alpha png_set_compression_mem_level png_set_compression_method png_set_compression_strategy png_set_compression_window_bits png_set_crc_action png_set_flush png_set_gAMA_fixed png_set_invalid png_set_invert_alpha png_set_keep_unknown_chunks png_set_mem_fn png_set_pCAL png_set_read_status_fn png_set_read_user_transform_fn png_set_rgb_to_gray_fixed png_set_sCAL png_set_sPLT png_set_sRGB_gAMA_and_cHRM png_set_tRNS_to_alpha png_set_unknown_chunks png_set_unknown_chunk_location png_set_read_user_chunk_fn png_set_user_limits png_set_user_transform_info png_set_write_status_fn png_set_write_user_transform_fn png_set_compression_buffer_size png_start_read_image png_write_chunk_data png_write_chunk_end png_write_chunk_start png_write_info_before_PLTE
Some experimental functions have not been included as well: png_set_filter_heuristics
For LSB compliance, applications that dynamically link with libpng and use these symbols shall need to replace those function calls with alternate code that use only symbols from the LSB libraries. Otherwise, the application must link with the libpng library statically. Here are a few hints to replace code in applications if they use some of these interfaces listed above
- Replace png_check_sig with png_sig_cmp
- Replace png_get_header_ver with png_get_libpng_ver
- Replace png_set_gray_1_2_4_to_8, png_set_palette_to_rgb, png_set_tRNS_to_alpha with png_set_expand. This may change in future release. * Replace png_convert_from_struct_tm, png_convert_from_time_t, png_convert_to_rfc1123 with standard library functions provided in time.h. These functions have been found to be rarely used.
Structure definitions: The structures png_struct_def has been opaque in LSB. The members of the structure cannot be assumed to be available for access by an application. One common example of direct access is jmpbuf, which is not recommended to be accessed directly as described in http://www.libpng.org/pub/png/book/chapter13.html#png.ch13.div.3. The solution is possible with later releases of libpng (version 1.0.3) onwards as described in http://www.libpng.org/pub/png/book/chapter14.html#png.ch14.div.2. The process basically is to store jmpbuf location is a user defined structure and setup a user defined error handler.
Reference pointers:
- Online book: http://www.libpng.org/pub/png/book/
- Mailing list: http://lists.sourceforge.net/lists/listinfo/png-mng-implement


