--- origsrc/libXpm-3.5.12/Makefile.am 2016-12-12 16:44:47.000000000 -0500 +++ src/libXpm-3.5.12/Makefile.am 2017-11-14 18:59:05.860229400 -0500 @@ -6,7 +6,7 @@ SUBDIRS = doc include man src sxpm cxpm ACLOCAL_AMFLAGS = -I m4 pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = xpm.pc +pkgconfig_DATA = xpm-nox.pc EXTRA_DIST = COPYRIGHT NEWS.old --- origsrc/libXpm-3.5.12/configure.ac 2016-12-12 17:09:25.000000000 -0500 +++ src/libXpm-3.5.12/configure.ac 2017-11-14 19:03:15.445588100 -0500 @@ -10,8 +10,38 @@ AC_CONFIG_MACRO_DIR([m4]) # Initialize Automake AM_INIT_AUTOMAKE([foreign dist-bzip2]) +dnl Check for host type +AC_CANONICAL_HOST + # Initialize libtool -AC_PROG_LIBTOOL +AC_PROG_CC +AM_PROG_CC_C_O +LT_INIT([win32-dll]) + +dnl Compilation on mingw and Cygwin needs special Makefile rules +if test "$enable_shared" = yes; then + case "$host_os" in + mingw* | cygwin*) is_woe32dll=yes ;; + *) is_woe32dll=no ;; + esac +else + is_woe32dll=no +fi +AM_CONDITIONAL([WOE32DLL], [test $is_woe32dll = yes]) +if test $is_woe32dll = yes; then + AC_DEFINE([WOE32DLL], 1, + [Define when --enable-shared is used on mingw or Cygwin.]) +fi +dnl the following is true on windows even if building non-shared +case "$host_os" in + mingw* | cygwin* ) is_woe32_platform=yes ;; + *) is_woe32_platform=no ;; +esac +AM_CONDITIONAL([WOE32_PLATFORM], [test $is_woe32_platform = yes]) +if test $is_woe32_platform = yes; then + AC_DEFINE([WOE32_PLATFORM], 1, + [Define if host is some flavor of MSW: mingw, cygwin, msvc, etc]) +fi # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS m4_ifndef([XORG_MACROS_VERSION], @@ -23,9 +53,10 @@ XORG_DEFAULT_OPTIONS AC_CHECK_FUNCS([strlcat]) # Obtain compiler/linker options for dependencies -PKG_CHECK_MODULES(XPM, xproto x11) -PKG_CHECK_MODULES(SXPM, [x11 xt xext xextproto xproto >= 7.0.17], - [build_sxpm=true], [build_sxpm=false]) +dnl PKG_CHECK_MODULES(XPM, xproto x11) +dnl PKG_CHECK_MODULES(SXPM, [x11 xt xext xextproto xproto >= 7.0.17], +dnl [build_sxpm=true], [build_sxpm=false]) +build_sxpm=false AM_CONDITIONAL(BUILD_SXPM, test x$build_sxpm = xtrue) # Internationalization & localization support @@ -74,5 +105,5 @@ AC_CONFIG_FILES([Makefile src/Makefile sxpm/Makefile cxpm/Makefile - xpm.pc]) + xpm-nox.pc]) AC_OUTPUT --- origsrc/libXpm-3.5.12/cxpm/Makefile.am 2016-12-12 16:44:47.000000000 -0500 +++ src/libXpm-3.5.12/cxpm/Makefile.am 2017-11-14 18:59:05.849168000 -0500 @@ -1,7 +1,10 @@ bin_PROGRAMS = cxpm AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/include/X11 -AM_CFLAGS = $(CWARNFLAGS) $(XPM_CFLAGS) +AM_CFLAGS = $(CWARNFLAGS) $(XPM_CFLAGS) -DXPM_NO_X +if WOE32_PLATFORM +cxpm_LDADD = -lgdi32 -luser32 +endif cxpm_SOURCES = cxpm.c --- origsrc/libXpm-3.5.12/include/Makefile.am 2016-12-12 16:44:47.000000000 -0500 +++ src/libXpm-3.5.12/include/Makefile.am 2017-11-14 18:59:05.854696000 -0500 @@ -1 +1,5 @@ nobase_include_HEADERS = X11/xpm.h + +libXpmincludedir = $(includedir)/X11 +libXpminclude_HEADERS = $(top_srcdir)/src/simx.h + --- origsrc/libXpm-3.5.12/src/Makefile.am 2016-12-12 16:44:47.000000000 -0500 +++ src/libXpm-3.5.12/src/Makefile.am 2017-11-14 18:59:05.870285400 -0500 @@ -1,35 +1,36 @@ # Daniel Stone disowns all copyright on this file. -lib_LTLIBRARIES=libXpm.la +lib_LTLIBRARIES=libXpm-noX.la AM_CPPFLAGS = -I$(top_srcdir)/include/X11/ -AM_CFLAGS = $(CWARNFLAGS) $(XPM_CFLAGS) +AM_CFLAGS = $(CWARNFLAGS) $(XPM_CFLAGS) -DXPM_NO_X -libXpm_la_LDFLAGS = -version-number 4:11:0 -no-undefined -libXpm_la_LIBADD = $(XPM_LIBS) +if WOE32DLL +DEFCMD = -export-symbols libXpm-noX.exp +libXpm_noX_la_DEPENDENCIES = libXpm-noX.exp +libXpm_noX_extralibs = -lgdi32 -luser32 +else +DEFCMD = +libXpm_noX_extralibs = +endif -libXpm_la_SOURCES = \ +libXpm_noX_la_LDFLAGS = -version-number 4:11:0 -no-undefined $(DEFCMD) +libXpm_noX_la_LIBADD = $(XPM_LIBS) $(libXpm_noX_extralibs) + +libXpm_noX_la_SOURCES = \ Attrib.c \ CrBufFrI.c \ - CrBufFrP.c \ CrDatFrI.c \ - CrDatFrP.c \ CrIFrBuf.c \ CrIFrDat.c \ - CrIFrP.c \ - CrPFrBuf.c \ - CrPFrDat.c \ - CrPFrI.c \ Image.c \ Info.c \ RdFToBuf.c \ RdFToDat.c \ RdFToI.c \ - RdFToP.c \ WrFFrBuf.c \ WrFFrDat.c \ WrFFrI.c \ - WrFFrP.c \ XpmI.h \ create.c \ data.c \ @@ -38,6 +39,13 @@ libXpm_la_SOURCES = \ parse.c \ rgb.c \ rgbtab.h \ - scan.c + scan.c \ + simx.c + +EXTRA_DIST = amigax.c amigax.h simx.c simx.h libXpm-noX.def \ + CrBufFrP.c CrDatFrP.c CrIFrP.c CrPFrBuf.c CrPFrDat.c CrPFrI.c \ + RdFToP.c WrFFrP.c + +libXpm-noX.exp: $(srcdir)/libXpm-noX.def + cat $(srcdir)/libXpm-noX.def | sed -e '1d' -e 's/@.*$$//' > $@ -EXTRA_DIST = amigax.c amigax.h simx.c simx.h --- origsrc/libXpm-3.5.12/src/libXpm-noX.def 1969-12-31 19:00:00.000000000 -0500 +++ src/libXpm-3.5.12/src/libXpm-noX.def 2017-11-14 18:59:05.864237300 -0500 @@ -0,0 +1,69 @@ +EXPORTS +XpmAttributesSize @1 +XpmCreateBufferFromImage @2 +XDefaultVisual @3 +XImageFree @4 +XpmCreateBufferFromXpmImage @5 +XpmCreateDataFromImage @6 +XpmCreateDataFromXpmImage @7 +XpmCreateImageFromBuffer @8 +XpmCreateImageFromData @9 +XpmCreateImageFromXpmImage @10 +XpmCreateXpmImageFromBuffer @11 +XpmCreateXpmImageFromData @12 +XpmFree @13 +XpmFreeExtensions @14 +XpmGetErrorString @15 +XpmCreateXpmImageFromImage @16 +XpmLibraryVersion @17 +XpmReadFileToImage @18 +XpmFreeAttributes @19 +XpmReadFileToXpmImage @20 +XpmFreeXpmImage @21 +XpmFreeXpmInfo @22 +XpmWriteFileFromBuffer @23 +boundCheckingRealloc @24 +XpmReadFileToBuffer @25 +XpmReadFileToData @26 +xpmFreeColorTable @27 +xpmFreeRgbNames @28 +xpmGetCmt @29 +xpmGetRGBfromName @30 +XpmWriteFileFromData @31 +XpmWriteFileFromImage @32 +xpmGetRgbName @33 +XpmWriteFileFromXpmImage @34 +xpmGetString @35 +xpmHashIntern @36 +xpmHashSlot @37 +xpmHashTableFree @38 +xpmHashTableInit @39 +xpmInitAttributes @40 +xpmInitXpmImage @41 +xpmInitXpmInfo @42 +xpmNextString @43 +xpmNextUI @44 +xpmNextWord @45 +xpmParseColors @46 +xpmParseData @47 +xpmParseDataAndCreate @48 +xpmParseExtensions @49 +xpmParseHeader @50 +xpmParseValues @51 +xpmReadRgbNames @52 +xpmSetAttributes @53 +xpmSetInfo @54 +xpmSetInfoMask @55 +xpmatoui @56 +xpmstrcasecmp @57 +boundCheckingMalloc @100 +boundCheckingCalloc @101 +XDefaultScreen @104 +XDefaultDepth @105 +XDefaultColormap @106 +XParseColor @107 +XAllocColor @108 +XQueryColors @109 +XFreeColors @110 +XCreateImage @111 +XDestroyImage @113 --- origsrc/libXpm-3.5.12/xpm-nox.pc.in 1969-12-31 19:00:00.000000000 -0500 +++ src/libXpm-3.5.12/xpm-nox.pc.in 2017-11-14 18:59:05.877246300 -0500 @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: Xpm-noX +Description: X Pixmap Library +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} -DXPM_NO_X +Libs: -L${libdir} -lXpm-noX -lgdi32 -luser32 --- origsrc/libXpm-3.5.12/xpm.pc.in 2016-12-12 16:44:47.000000000 -0500 +++ src/libXpm-3.5.12/xpm.pc.in 1969-12-31 19:00:00.000000000 -0500 @@ -1,12 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: Xpm -Description: X Pixmap Library -Version: @PACKAGE_VERSION@ -Requires: x11 -Requires.private: x11 -Cflags: -I${includedir} -Libs: -L${libdir} -lXpm