History

ghostscript: create usable static library, don't use bundled lcms2

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.

darealshinji committed 8 years ago

Commit 44b00a41 parent 0bf81331 file · +8 −8Browse files

Unified · Split

src/ghostscript.mk+8−8
@@ -18,13 +18,12 @@ define $(PKG)_UPDATE · 17 unmodified lines
1818 endef
1919
2020 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
2222 cd '$(SOURCE_DIR)' && autoreconf -f -i
2323 cd '$(BUILD_DIR)' && CCAUX='$(BUILD_CC)' \
2424 CPPFLAGS='$(CPPFLAGS) -DHAVE_SYS_TIMES_H=0' \
2525 $(SOURCE_DIR)/configure \
2626 $(MXE_CONFIGURE_OPTS) \
27− --with-exe-ext='.exe' \
2827 --with-drivers=ALL \
2928 --with-arch_h='$(SOURCE_DIR)/arch/windows-x$(if $(filter x86_64-%,$(TARGET)),64,86)-msvc.h' \
3029 --with-memory-alignment='$(if $(filter x86_64-%,$(TARGET)),8,4)' \
@@ -32,13 +31,11 @@ define $(PKG)_BUILD · 1 unmodified line
3231 --disable-cups \
3332 --disable-gtk \
3433 --with-libiconv=gnu \
35− --with-system-libtiff \
3634 --without-ijs
37− $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' $(if $(BUILD_STATIC),all libgs,so \
38− CFLAGS_SO='' \
35+ $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' so CFLAGS_SO='' \
3936 GS_LDFLAGS_SO='-shared -Wl,--out-implib=sobin/libgs.dll.a' \
4037 GS_SONAME_MAJOR='libgs-ignore-me.dll' \
41− GS_SONAME_MAJOR_MINOR='libgs-9.dll')
38+ GS_SONAME_MAJOR_MINOR='libgs-9.dll'
4239
4340 $(INSTALL) -d '$(PREFIX)/$(TARGET)/include/ghostscript'
4441 $(INSTALL) '$(SOURCE_DIR)/devices/gdevdsp.h' '$(PREFIX)/$(TARGET)/include/ghostscript/gdevdsp.h'
@@ -48,9 +45,12 @@ define $(PKG)_BUILD · 3 unmodified lines
4845
4946 $(INSTALL) -d '$(PREFIX)/$(TARGET)/bin'
5047 $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib'
51− #$(INSTALL) '$(BUILD_DIR)/$(if $(BUILD_STATIC),bin/gs,sobin/gsc).exe' '$(PREFIX)/$(TARGET)/bin/gs.exe'
5248 $(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+ ,\
5454 $(INSTALL) '$(BUILD_DIR)/sobin/libgs-9.dll' '$(PREFIX)/$(TARGET)/bin/libgs-9.dll' && \
5555 $(INSTALL) '$(BUILD_DIR)/sobin/libgs.dll.a' '$(PREFIX)/$(TARGET)/lib/libgs.dll.a')
5656

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t