From d4ebb803fa91ee730506623cca31d14977f68aae Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Mon, 2 Nov 2009 21:03:14 -0600 Subject: [PATCH] [master] Added scripts/makefile.wce and scripts/png32ce.def to support WindowsCE. --- ANNOUNCE | 8 +- CHANGES | 8 +- scripts/makefile.wce | 113 ++++++++++++++++++++ scripts/png32ce.def | 246 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 369 insertions(+), 6 deletions(-) create mode 100644 scripts/makefile.wce create mode 100644 scripts/png32ce.def diff --git a/ANNOUNCE b/ANNOUNCE index 8d74bc203..42c851cab 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.2.41beta13 - November 2, 2009 +Libpng 1.2.41beta13 - November 3, 2009 This is not intended to be a public release. It will be replaced within a few weeks by a public version or by another test version. @@ -109,8 +109,10 @@ version 1.2.41beta11 [November 2, 2009] version 1.2.41beta12 [November 2, 2009] Free png_ptr->user_png_ver when destroying png_ptr. -version 1.2.41beta13 [November 2, 2009] - Updated scripts/pngw32.def +version 1.2.41beta13 [November 3, 2009] + Updated scripts/pngw32.def and projects/wince/png32ce.def + Copied projects/wince/png32ce.def to the scripts directory. + Added scripts/makefile.wce Patched ltmain.sh for wince support. Added PNG_CONVERT_tIME_SUPPORTED macro. diff --git a/CHANGES b/CHANGES index 065f8cb39..1ee8a1148 100644 --- a/CHANGES +++ b/CHANGES @@ -2466,7 +2466,7 @@ version 1.2.40beta01 [August 20, 2009] version 1.2.40rc01 [September 2, 2009] Various bugfixes and improvements to CMakeLists.txt (Philip Lowman) -version 1.2.40 and 1.0.49 [November 2, 2009] +version 1.2.40 and 1.0.49 [November 3, 2009] No changes. version 1.0.50 [September 10, 2009] @@ -2539,8 +2539,10 @@ version 1.2.41beta11 [November 2, 2009] version 1.2.41beta12 [November 2, 2009] Free png_ptr->user_png_ver when destroying png_ptr. -version 1.2.41beta13 [November 2, 2009] - Updated scripts/pngw32.def +version 1.2.41beta13 [November 3, 2009] + Updated scripts/pngw32.def and projects/wince/png32ce.def + Copied projects/wince/png32ce.def to the scripts directory. + Added scripts/makefile.wce Patched ltmain.sh for wince support. Added PNG_CONVERT_tIME_SUPPORTED macro. diff --git a/scripts/makefile.wce b/scripts/makefile.wce new file mode 100644 index 000000000..55e710f7d --- /dev/null +++ b/scripts/makefile.wce @@ -0,0 +1,113 @@ +# Makefile for creating Windows CE release archives, with the +# mingw32ce compiler. + +# Last updated: 22-Jul-2008 + +# Copyright (C) 2008 Vincent Torri + +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# To get some help, type +# +# make help +# +# To create the archives +# +# make +# +# To remove everything, type: +# +# make clean + +VERMAJ = 1 +VERMIN = 2 +VERMIC = 41 +VER = $(VERMAJ).$(VERMIN).$(VERMIC) +NAME = libpng +PACKAGE = $(NAME)-$(VER) + +BIN = libpng12-0.dll libpng-3.dll +LIB = libpng12.a libpng12.dll.a libpng.a libpng.dll.a scripts/png32ce.def +INCLUDE = png.h pngconf.h +PC = libpng12.pc libpng.pc + +MANIFESTVERBIN = "Libpng-$(VER): Binary files" +MANIFESTVERDEV = "Libpng-$(VER): Developer files" +MANIFESTVERDESC = "Libpng: the official PNG reference library" + +all: $(NAME) + +$(NAME): remove-old copy-src compilation copy manifest archive + @echo " * Removal of the directories" + @rm -rf $(PACKAGE)/ $(PACKAGE)-bin/ $(PACKAGE)-dev/ + +remove-old: + @echo " * Removal of the old files" + @rm -rf $(PACKAGE)-bin* + @rm -rf $(PACKAGE)-dev* + +copy-src: + @echo " * Copy of source files" + @cp -R ../src/$(PACKAGE) . + @echo " * Creation of directories and files" + @mkdir -p $(PACKAGE)-bin/bin + @mkdir -p $(PACKAGE)-bin/manifest + @mkdir -p $(PACKAGE)-dev/lib/pkgconfig + @mkdir -p $(PACKAGE)-dev/include/$(NAME)$(VERMAJ)$(VERMIN) + @mkdir -p $(PACKAGE)-dev/manifest + @touch $(PACKAGE)-bin/manifest/$(PACKAGE)-bin.mft + @touch $(PACKAGE)-bin/manifest/$(PACKAGE)-bin.ver + @touch $(PACKAGE)-dev/manifest/$(PACKAGE)-dev.mft + @touch $(PACKAGE)-dev/manifest/$(PACKAGE)-dev.ver + +compilation: + @echo " * Compilation of $(PACKAGE)" + cd $(PACKAGE) && CPPFLAGS="$(CPPFLAGS) -DPNG_BUILD_DLL -DPNG_CONSOLE_IO_SUPPORTED -DPNG_NO_MMX_CODE -D_WIN32_WCE=0x0420" CFLAGS="$(CFLAGS) -mms-bitfields -O3 -pipe -fomit-frame-pointer" LDFLAGS="$(LDFLAGS) -Wl,--enable-auto-import -Wl,-s" ./configure --prefix=/opt/wince --host=arm-mingw32ce && make + +copy: + @echo " * Copy of binary and development files" + @for i in $(BIN); do \ + cp $(PACKAGE)/.libs/$$i $(PACKAGE)-bin/bin; \ + done + @for i in $(LIB); do \ + cp $(PACKAGE)/.libs/$$i $(PACKAGE)-dev/lib; \ + done + @for i in $(INCLUDE); do \ + cp $(PACKAGE)/$$i $(PACKAGE)-dev/include/$(NAME)$(VERMAJ)$(VERMIN); \ + done + @for i in $(PC); do \ + cp $(PACKAGE)/$$i $(PACKAGE)-dev/lib/pkgconfig; \ + done + +manifest: + @echo " * Creation of the manifest" + @cd $(PACKAGE)-bin && find * >> manifest/$(PACKAGE)-bin.mft + @cd $(PACKAGE)-bin && \ + echo $(MANIFESTVERBIN) >> manifest/$(PACKAGE)-bin.ver && \ + echo $(MANIFESTVERDESC) >> manifest/$(PACKAGE)-bin.ver + @cd $(PACKAGE)-dev && find * >> manifest/$(PACKAGE)-dev.mft + @cd $(PACKAGE)-dev && \ + echo $(MANIFESTVERDEV) >> manifest/$(PACKAGE)-dev.ver && \ + echo $(MANIFESTVERDESC) >> manifest/$(PACKAGE)-dev.ver + +archive: + @echo " * Creation of the archives" + @tar cf $(PACKAGE)-bin.tar $(PACKAGE)-bin + @bzip2 -9 $(PACKAGE)-bin.tar + @tar cf $(PACKAGE)-dev.tar $(PACKAGE)-dev + @bzip2 -9 $(PACKAGE)-dev.tar + +clean: + @echo " * Cleaning" + @rm -rf $(PACKAGE)* + +help: + @echo + @echo "To create the archives, type:" + @echo " make" + @echo + @echo "To remove everything, type:" + @echo " make clean" + @echo diff --git a/scripts/png32ce.def b/scripts/png32ce.def new file mode 100644 index 000000000..a4cbaebac --- /dev/null +++ b/scripts/png32ce.def @@ -0,0 +1,246 @@ +;------------------------------------------ +; LIBPNG module definition file for Windows +;------------------------------------------ + +LIBRARY lpngce + +EXPORTS +;Version 1.2.41beta13 + png_build_grayscale_palette @1 + png_check_sig @2 + png_chunk_error @3 + png_chunk_warning @4 +; png_convert_from_struct_tm @5 +; png_convert_from_time_t @6 + png_create_info_struct @7 + png_create_read_struct @8 + png_create_write_struct @9 + png_data_freer @10 + png_destroy_info_struct @11 + png_destroy_read_struct @12 + png_destroy_write_struct @13 + png_error @14 + png_free @15 + png_free_data @16 + png_get_IHDR @17 + png_get_PLTE @18 + png_get_bKGD @19 + png_get_bit_depth @20 + png_get_cHRM @21 + png_get_cHRM_fixed @22 + png_get_channels @23 + png_get_color_type @24 + png_get_compression_buffer_size @25 + png_get_compression_type @26 + png_get_copyright @27 + png_get_error_ptr @28 + png_get_filter_type @29 + png_get_gAMA @30 + png_get_gAMA_fixed @31 + png_get_hIST @32 + png_get_header_ver @33 + png_get_header_version @34 + png_get_iCCP @35 + png_get_image_height @36 + png_get_image_width @37 + png_get_interlace_type @38 + png_get_io_ptr @39 + png_get_libpng_ver @40 + png_get_oFFs @41 + png_get_pCAL @42 + png_get_pHYs @43 + png_get_pixel_aspect_ratio @44 + png_get_pixels_per_meter @45 + png_get_progressive_ptr @46 + png_get_rgb_to_gray_status @47 + png_get_rowbytes @48 + png_get_rows @49 + png_get_sBIT @50 + png_get_sCAL @51 + png_get_sPLT @52 + png_get_sRGB @53 + png_get_signature @54 + png_get_tIME @55 + png_get_tRNS @56 + png_get_text @57 + png_get_unknown_chunks @58 + png_get_user_chunk_ptr @59 + png_get_user_transform_ptr @60 + png_get_valid @61 + png_get_x_offset_microns @62 + png_get_x_offset_pixels @63 + png_get_x_pixels_per_meter @64 + png_get_y_offset_microns @65 + png_get_y_offset_pixels @66 + png_get_y_pixels_per_meter @67 + png_malloc @68 + png_memcpy_check @69 + png_memset_check @70 + png_permit_empty_plte @71 + png_process_data @72 + png_progressive_combine_row @73 + png_read_end @74 + png_read_image @75 + png_read_info @76 +; png_read_init is deprecated + png_read_init @77 + png_read_png @78 + png_read_row @79 + png_read_rows @80 + png_read_update_info @81 + png_reset_zstream @82 + png_set_IHDR @83 + png_set_PLTE @84 + png_set_bKGD @85 + png_set_background @86 + png_set_bgr @87 + png_set_cHRM @88 + png_set_cHRM_fixed @89 + png_set_compression_buffer_size @90 + png_set_compression_level @91 + png_set_compression_mem_level @92 + png_set_compression_method @93 + png_set_compression_strategy @94 + png_set_compression_window_bits @95 + png_set_crc_action @96 + png_set_dither @97 + png_set_error_fn @98 + png_set_expand @99 + png_set_filler @100 + png_set_filter @101 + png_set_filter_heuristics @102 + png_set_flush @103 + png_set_gAMA @104 + png_set_gAMA_fixed @105 + png_set_gamma @106 + png_set_gray_1_2_4_to_8 @107 ; deprecated + png_set_gray_to_rgb @108 + png_set_hIST @109 + png_set_iCCP @110 + png_set_interlace_handling @111 + png_set_invert_alpha @112 + png_set_invert_mono @113 + png_set_keep_unknown_chunks @114 + png_set_oFFs @115 + png_set_pCAL @116 + png_set_pHYs @117 + png_set_packing @118 + png_set_packswap @119 + png_set_palette_to_rgb @120 + png_set_progressive_read_fn @121 + png_set_read_fn @122 + png_set_read_status_fn @123 + png_set_read_user_chunk_fn @124 + png_set_read_user_transform_fn @125 + png_set_rgb_to_gray @126 + png_set_rgb_to_gray_fixed @127 + png_set_rows @128 + png_set_sBIT @129 + png_set_sCAL @130 + png_set_sPLT @131 + png_set_sRGB @132 + png_set_sRGB_gAMA_and_cHRM @133 + png_set_shift @134 + png_set_sig_bytes @135 + png_set_strip_16 @136 + png_set_strip_alpha @137 + png_set_swap @138 + png_set_swap_alpha @139 + png_set_tIME @140 + png_set_tRNS @141 + png_set_tRNS_to_alpha @142 + png_set_text @143 + png_set_unknown_chunk_location @144 + png_set_unknown_chunks @145 + png_set_user_transform_info @146 + png_set_write_fn @147 + png_set_write_status_fn @148 + png_set_write_user_transform_fn @149 + png_sig_cmp @150 + png_start_read_image @151 + png_warning @152 + png_write_chunk @153 + png_write_chunk_data @154 + png_write_chunk_end @155 + png_write_chunk_start @156 + png_write_end @157 + png_write_flush @158 + png_write_image @159 + png_write_info @160 + png_write_info_before_PLTE @161 +; png_write_init is deprecated + png_write_init @162 + png_write_png @163 + png_write_row @164 + png_write_rows @165 +; png_read_init_2 and png_write_init_2 are deprecated. + png_read_init_2 @166 + png_write_init_2 @167 + png_access_version_number @168 +; png_sig_bytes @169 +; png_libpng_ver @170 + png_init_io @171 + png_convert_to_rfc1123 @172 + png_set_invalid @173 +; Added at version 1.0.12 +; For compatiblity with 1.0.7-1.0.11 + png_info_init @174 + png_read_init_3 @175 + png_write_init_3 @176 + png_info_init_3 @177 + png_destroy_struct @178 +; Added at version 1.2.0 +; For use with PNG_USER_MEM_SUPPORTED +; png_destroy_struct_2 @179 +; png_create_read_struct_2 @180 +; png_create_write_struct_2 @181 +; png_malloc_default @182 +; png_free_default @183 +; MNG features +; png_permit_mng_features @184 +; MMX support +; png_mmx_support @185 +; png_get_mmx_flagmask @186 +; png_get_asm_flagmask @187 +; png_get_asm_flags @188 +; png_get_mmx_bitdepth_threshold @189 +; png_get_mmx_rowbytes_threshold @190 +; png_set_asm_flags @191 +; png_init_mmx_flags @192 +; Strip error numbers +; png_set_strip_error_numbers @193 +; Added at version 1.2.2 + png_handle_as_unknown @179 + png_zalloc @180 + png_zfree @181 +; png_handle_as_unknown @194 +; png_zalloc @195 +; png_zfree @196 +; Added at version 1.2.6 + png_malloc_warn @195 + png_get_user_height_max @196 + png_get_user_width_max @197 + png_set_user_limits @198 +; Added at version 1.2.7 + png_set_add_alpha @199 +; Added at version 1.2.9 + png_get_uint_32 @200 + png_save_uint_32 @201 + png_get_uint_16 @202 + png_save_uint_16 @203 + png_get_int_32 @204 + png_save_int_32 @205 + png_get_uint_31 @206 + png_set_expand_gray_1_2_4_to_8 @207 +; Added at version 1.2.41 + png_write_sig @208 + png_benign_error @209 + png_benign_chunk_error @210 + png_set_benign_error @211 + png_get_io_chunk_name @212 + png_get_io_state @213 + png_set_premultiply_alpha @214 + png_get_chunk_cache_max @215 + png_set_chunk_cache_max @216 + png_check_cHRM_fixed @217 + png_calloc @218 -- GitLab