It appears that the default static library created with "make libgs" doesn't always work correctly. I had issues where a postscript viewer would only display the .ps files if it was linked against the shared library (same happened for native Linux builds). Creating the static library manually from the object files that were used to build the dll fixes this issue.
Showing the changes to src/ghostscript.mk (1 of 1 file). Show all
Unified · Split
| @@ -18,13 +18,12 @@ define $(PKG)_UPDATE · 17 unmodified lines | |||
| 18 | endef | 18 | endef |
| 19 | 19 | ||
| 20 | define $(PKG)_BUILD | 20 | define $(PKG)_BUILD |
| 21 | cd '$(SOURCE_DIR)' && rm -rf freetype jpeg libpng openjpeg tiff zlib | 21 | cd '$(SOURCE_DIR)' && rm -rf freetype jpeg lcms2art libpng openjpeg tiff zlib |
| 22 | cd '$(SOURCE_DIR)' && autoreconf -f -i | 22 | cd '$(SOURCE_DIR)' && autoreconf -f -i |
| 23 | cd '$(BUILD_DIR)' && CCAUX='$(BUILD_CC)' \ | 23 | cd '$(BUILD_DIR)' && CCAUX='$(BUILD_CC)' \ |
| 24 | CPPFLAGS='$(CPPFLAGS) -DHAVE_SYS_TIMES_H=0' \ | 24 | CPPFLAGS='$(CPPFLAGS) -DHAVE_SYS_TIMES_H=0' \ |
| 25 | $(SOURCE_DIR)/configure \ | 25 | $(SOURCE_DIR)/configure \ |
| 26 | $(MXE_CONFIGURE_OPTS) \ | 26 | $(MXE_CONFIGURE_OPTS) \ |
| 27 | --with-exe-ext='.exe' \ | ||
| 28 | --with-drivers=ALL \ | 27 | --with-drivers=ALL \ |
| 29 | --with-arch_h='$(SOURCE_DIR)/arch/windows-x$(if $(filter x86_64-%,$(TARGET)),64,86)-msvc.h' \ | 28 | --with-arch_h='$(SOURCE_DIR)/arch/windows-x$(if $(filter x86_64-%,$(TARGET)),64,86)-msvc.h' \ |
| 30 | --with-memory-alignment='$(if $(filter x86_64-%,$(TARGET)),8,4)' \ | 29 | --with-memory-alignment='$(if $(filter x86_64-%,$(TARGET)),8,4)' \ |
| @@ -32,13 +31,11 @@ define $(PKG)_BUILD · 1 unmodified line | |||
| 32 | --disable-cups \ | 31 | --disable-cups \ |
| 33 | --disable-gtk \ | 32 | --disable-gtk \ |
| 34 | --with-libiconv=gnu \ | 33 | --with-libiconv=gnu \ |
| 35 | --with-system-libtiff \ | ||
| 36 | --without-ijs | 34 | --without-ijs |
| 37 | $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' $(if $(BUILD_STATIC),all libgs,so \ | 35 | $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' so CFLAGS_SO='' \ |
| 38 | CFLAGS_SO='' \ | ||
| 39 | GS_LDFLAGS_SO='-shared -Wl,--out-implib=sobin/libgs.dll.a' \ | 36 | GS_LDFLAGS_SO='-shared -Wl,--out-implib=sobin/libgs.dll.a' \ |
| 40 | GS_SONAME_MAJOR='libgs-ignore-me.dll' \ | 37 | GS_SONAME_MAJOR='libgs-ignore-me.dll' \ |
| 41 | GS_SONAME_MAJOR_MINOR='libgs-9.dll') | 38 | GS_SONAME_MAJOR_MINOR='libgs-9.dll' |
| 42 | 39 | ||
| 43 | $(INSTALL) -d '$(PREFIX)/$(TARGET)/include/ghostscript' | 40 | $(INSTALL) -d '$(PREFIX)/$(TARGET)/include/ghostscript' |
| 44 | $(INSTALL) '$(SOURCE_DIR)/devices/gdevdsp.h' '$(PREFIX)/$(TARGET)/include/ghostscript/gdevdsp.h' | 41 | $(INSTALL) '$(SOURCE_DIR)/devices/gdevdsp.h' '$(PREFIX)/$(TARGET)/include/ghostscript/gdevdsp.h' |
| @@ -48,9 +45,12 @@ define $(PKG)_BUILD · 3 unmodified lines | |||
| 48 | 45 | ||
| 49 | $(INSTALL) -d '$(PREFIX)/$(TARGET)/bin' | 46 | $(INSTALL) -d '$(PREFIX)/$(TARGET)/bin' |
| 50 | $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib' | 47 | $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib' |
| 51 | #$(INSTALL) '$(BUILD_DIR)/$(if $(BUILD_STATIC),bin/gs,sobin/gsc).exe' '$(PREFIX)/$(TARGET)/bin/gs.exe' | ||
| 52 | $(if $(BUILD_STATIC),\ | 48 | $(if $(BUILD_STATIC),\ |
| 53 | $(INSTALL) '$(BUILD_DIR)/bin/gs.a' '$(PREFIX)/$(TARGET)/lib/libgs.a',\ | 49 | cd '$(BUILD_DIR)' && \ |
| 50 | '$(PREFIX)/bin/$(TARGET)-ar' qc libgs.a `cat soobj/ldt.tr | tr ' ' '\n' | grep '^\./soobj/.*\.o$$'` && \ | ||
| 51 | '$(PREFIX)/bin/$(TARGET)-ranlib' libgs.a && \ | ||
| 52 | $(INSTALL) libgs.a '$(PREFIX)/$(TARGET)/lib/libgs.a' \ | ||
| 53 | ,\ | ||
| 54 | $(INSTALL) '$(BUILD_DIR)/sobin/libgs-9.dll' '$(PREFIX)/$(TARGET)/bin/libgs-9.dll' && \ | 54 | $(INSTALL) '$(BUILD_DIR)/sobin/libgs-9.dll' '$(PREFIX)/$(TARGET)/bin/libgs-9.dll' && \ |
| 55 | $(INSTALL) '$(BUILD_DIR)/sobin/libgs.dll.a' '$(PREFIX)/$(TARGET)/lib/libgs.dll.a') | 55 | $(INSTALL) '$(BUILD_DIR)/sobin/libgs.dll.a' '$(PREFIX)/$(TARGET)/lib/libgs.dll.a') |
| 56 | 56 | ||